using System;
using MySql.Data;
using MySql.Data.MySqlClient;

namespace blog.DAL {
    public class BaseDAL {
        public static string connectString = "Server=localhost;Database=asp_blog;Uid=root;Pwd=xylx1.t!@#;";
        private static MySqlConnection _connection;

        public static MySqlConnection getConnection () 
        {
            if (_connection == null) 
            {
                _connection = new MySqlConnection (connectString);
            }
            return _connection;
        }
    }
}